<template>
  <div class="container">
    <div class="top-box">
      <div class="left-box">
        <div class="color-box"></div>
        <p>公告详情</p>
      </div>
      <div class="right-box">
        <el-button type="info" icon="el-icon-back" class="btn_fanhui" @click="Return">返回</el-button>
      </div>
    </div>
    <div class="content-box">
      <div class="Title-box">{{item.title}}</div>
      <p class="explain-box">{{item.main}}</p>
      <div class="bottom-box">
        <div class="leftnav-box"></div>
        <div class="rightnav-box">
          <ul>
            <li>重要程度:{{item.degree}}</li>
            <li>信息类型:{{item.type}}</li>
            <li>接收对象：{{item.depart}}</li>
            <li>发布时间:{{item.createOn}}</li>
            <li>发布部门:{{item.departName}}</li>
            <li>发布人:{{item.name}}</li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import axios from 'axios'
export default {
  data () {
    return {
      id: 0,
      item: {},
    }
  },
  created () {
    this.id = this.$route.query.e;
    this.getlist();
    if (this.$route.query.shows == 0) {
      var obj = { id: this.$route.query.e, creater: JSON.parse(localStorage.getItem("message")).Id }
      var objs = JSON.stringify(obj);
      let the = { index: 6, jsondata: objs };
      axios.post("/apis/MyCenter.asmx/Examine", the).then(({ data }) => {
        // var list = JSON.parse(data.d);
      });
    }
  },
  methods: {
    Return () {
      window.history.go(-1);
    },
    getlist () {
      var obj = { id: this.id }
      var objs = JSON.stringify(obj);
      let the = { index: 4, jsondata: objs };
      axios.post("/apis/AdministrationManage.asmx/GetData", the).then(({ data }) => {
        var list = JSON.parse(data.d);
        if (list == null) { this.$message.error("数据异常"); } else { this.item = list; }
      });
    },
  }
}
</script>
<style lang="scss" scoped>
@import '@/assets/scss/base.scss';
.top-box {
  width: 100%;
  height: 60px;
  overflow: hidden;
  // border: 1px solid $red;
}
.left-box {
  width: 100px;
  height: 40px;
  float: left;
  margin-top: 10px;
  overflow: hidden;
  margin-left: 1%;
  // border: 1px solid red;
}
.color-box {
  width: 5px;
  height: 20px;
  float: left;
  margin-top: 10px;
  background-color: $Header_color;
}
.left-box p {
  float: left;
  margin-left: 5px;
  line-height: 40px;
}
.right-box {
  float: right;
  width: 90px;
  height: 40px;
  margin-right: 2%;
  border-radius: 2px;
  margin-top: 10px;
  background-color: $return-color;
  // border: 1px solid red;
}
.right-box:hover {
  background-color: #a4a6ad;
}
.right-box span {
  float: left;
  color: $white;
  font-size: $font-size-medium;
  line-height: 40px;
  //  border: 1px solid red;
}
.right-box img {
  width: 30px;
  height: 30px;
  margin-top: 5px;
  margin-left: 6px;
  float: left;
  // border: 1px solid red;
}
.content-box {
  width: 98%;
  height: 600px;
  margin: 0 auto;
  border-radius: 2px;
  background-color: $white;
}
.Title-box {
  width: 100%;
  height: 80px;
  line-height: 80px;
  text-align: center;
  font-size: $font-size-large;
  font-weight: bold;
  letter-spacing: 1px;
  border-bottom: 1px solid $bordercolor;
}
.explain-box {
  display: inline-block;
  height: 290px;
  text-indent: 25px;
  line-height: 35px;
  padding: 60px 5%;
  //  border: 1px solid red;
}
.bottom-box {
  width: 100%;
  height: 100px;
  display: flex;
  border-top: 1px solid $bordercolor;
}
.leftnav-box {
  width: 10%;
  height: 100px;
  //  border: 1px solid red;
}
.rightnav-box {
  flex: 1;
}
.rightnav-box ul {
  overflow: hidden;
  margin-left: 10%;
}
.rightnav-box .item-box {
  width: 27%;
  height: 100px;
  line-height: 90px;
  text-align: center;
  float: left;
}
.rightnav-box li {
  width: 16%;
  height: 100px;
  line-height: 90px;
  text-align: center;
  float: left;
  //  border: 1px solid red;
}
.btn-box {
  width: 20%;
  height: 60px;
  margin: 0 auto;
  margin-top: 20px;
  // border: 1px solid red;
}
</style>